#include <iostream>

using namespace std;
int main()
{
	int num = 0;
	cin >> num;
	bool flag1,flag2;
	flag1 = num % 2 ==0;
	flag2 = (num > 4) && (num <= 12);
	cout << (flag1 && flag2) <<" ";
	cout << (flag1 || flag2) << " ";
	cout << (flag1 ^ flag2) << " ";
	cout << (!flag1 && !flag2) << endl;
	
	return 0;
}
